import React, { useEffect, useState, useCallback } from 'react';
import ReactDOM from 'react-dom';
import { isEmpty } from '@/utils/common';
import { Mask, ModalWrap } from '@/design';
import { useSelector, useDispatch } from 'umi';

import styles from '../user.less';

// 預定信息
export default function (props: any) {
  const { ruleVisiable, onClose, onClickSure, type } = props;
  const { seatNum } = useSelector((state:any) => state.order);
  const dispatch = useDispatch();
  
  // const [seatNum, setSeatNum] = useState<number>(4);
  return (<ModalWrap headName={props.type === 'member' ? 'ume會員服務條款' : 'ume隱私權政策'} modalVisiable={ruleVisiable} onClose={onClose}  onClickSure={onClickSure} hideFooter={true}>
    <div className={styles.rule_wrap}>
        <iframe
          width="100%"
          height="100%"
          src={props.type === 'member' ? 'https://download.umeshop.ai/ume_member.html' : 'https://download.umeshop.ai/ume_privacy.html'}
        ></iframe>
    </div>
  </ModalWrap>
  )
}